package com.tkjt.pms.modules.indexManage.controller;

import com.tkjt.pms.common.entity.TkIndexInfo;
import com.tkjt.pms.modules.indexManage.service.IndexManageService;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/api/indexManage")
public class IndexManageController {

    @Autowired
    private IndexManageService indexManageService;

    @GetMapping("/list")
    public Result getRedisInfo(HttpServletRequest request) {
        try {
            List<TkIndexInfo> list= indexManageService.getTkIndexInfoList(request);
            return Result.ok(list);
        }catch (Exception e){e.printStackTrace();
            return Result.error("获取数据异常");
        }

    }


    
}
